#include<stdio.h>
#include<string.h>
#include<unistd.h>

int main()
{
	int i = 0;
	char bar[102];
	memset(bar, 0, sizeof(char)*102);
	const char* lable = "/-|/";
	while(i <= 100)
	{
		printf("[%-100s] %d%% %c\r",bar, i, lable[i % 4]);
		fflush(stdout);
		bar[i++] =  '#';
		usleep(10000);
	}
	return 0;
}
